@extends('layouts.default')
@section('content') 
        <div class="col-lg-12">
            <div class="box">
                <header>
                    <div class="icons">
                        <i class="fa fa-table"></i>
                    </div>
                    <h5>{{ Lang::get('messages.processes') }}</h5>
                    <div class="toolbar">  
                        {{ Helpers\Helper::fa_link_to_action('glyphicon glyphicon-plus',
                            'MaintenanceController@create_processes',
                            Lang::get('messages.add_btn'),null,array(
                            'class'=>'btn btn-success btn-xs btn-round'))
                        }}  
                    </div>
                </header>
                <table id="dataTable"  style="width:100%" class="table table-bordered table-condensed table-hover table-striped">
                    <thead style="width:100%">
                        <tr>
                            <th>{{Lang::get('messages.process')}}</th>
                            <th>{{Lang::get('messages.km_due')}}</th>
                            <th>{{Lang::get('messages.month_due')}}</th>
                            <th>{{Lang::get('messages.action')}}</th>
                        </tr>
                    </thead>
                    <tbody  style="width:100%">                          
                        @foreach ($data as $d)
                        <tr> 
                            <td>{{ Lang::get('processes.'.$d->process) }}</td>    
                            <td>{{ Lang::get($d->km_due) }}</td>  
                            <td>{{ Lang::get($d->month_due) }}</td> 
                            <td>
                                {{ Helpers\Helper::fa_link_to_action('glyphicon glyphicon-trash',
                                        'MaintenanceController@destroy_processes',Lang::get('messages.delete_btn'),array('id'=>$d->id),array(
                                        'class'=>'btn btn-danger btn-xs btn-round delete',
                                'data-confirm'=>Lang::get('messages.confirm_delete')))
                                }}
                            </td>                                
                            @endforeach
                    </tbody>
                </table>
                <a type="button" class="btn btn-danger btn-line" href='{{URL::to('processes')}}'>{{Lang::get('messages.back_btn')}}</a>
            </div>
        </div>
        {{  Helpers\Helper::modal(Lang::get('messages.modal_confirm'),Lang::get("messages.close_btn"),Lang::get("messages.ok_btn"),'dataConfirmOK')}}
        
@stop
